Skip to content

Add Netlify DB store adapter#39

Merged
pablonete merged 1 commit into
mainfrom
pablonete-add-netlify-db-adapter
Jun 24, 2026
Merged

Add Netlify DB store adapter#39
pablonete merged 1 commit into
mainfrom
pablonete-add-netlify-db-adapter

Conversation

@pablonete

Copy link
Copy Markdown
Member

This continues the storage migration away from eventually consistent blob writes by adding the first Netlify DB-backed persistence implementation. The blob backend remains the default, but Netlify can now opt into DB-backed data and magic-token stores through explicit config.

Summary

  • Adds the initial Postgres schema for conference settings, kids, passports, prizes, prize awards, and magic-link tokens.
  • Implements a Netlify DB store adapter using @netlify/neon behind the existing command-oriented store interface.
  • Preserves app-owned IDs for kids, prizes, awards, and token hashes; the database does not generate user-facing IDs or maintain a separate kid counter table.
  • Derives prize given counts from prize awards and keeps passport state in relational rows.
  • Adds a DB-backed magic-link token store and Netlify function config switches for data and token backends.
  • Documents the DB backend toggle and schema location.

Notes for review

  • Blob storage remains the default runtime backend.
  • Migration/population tooling and dual-write rollout are intentionally left for follow-up PRs.
  • No UI changes; screenshots are N/A.

Validation

  • npm run --silent lint
  • npm run --silent build
  • npm run --silent build:server
  • git --no-pager diff --check

Add the initial Netlify DB schema and a Postgres-backed store implementation for kids, passports, prizes, prize awards, and magic-link tokens. Wire Netlify functions to opt into DB-backed stores with explicit backend config while keeping blob storage as the default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for kid-a ready!

Name Link
🔨 Latest commit bfdef4e
🔍 Latest deploy log https://app.netlify.com/projects/kid-a/deploys/6a3c44d9dfcbb9000840e9e2
😎 Deploy Preview https://deploy-preview-39--kid-a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pablonete pablonete merged commit 06220a5 into main Jun 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant